package com.thh.idempotent.util;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.thh.idempotent.model.vo.ResultVo;

/**
 * @description:
 * @author: thh
 * @time: 2020/6/7 10:05
 */
public class JSONUtil {

   static ObjectMapper objectMapper = new ObjectMapper();

    public static String toJsonStr(ResultVo resultVo){

        try {
         return    objectMapper.writeValueAsString(resultVo);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }


        return "";
    }
}
